package com.ss.android.article.share.entity;

import android.content.Context;
import android.graphics.Bitmap;
import android.support.design.a;
import android.text.TextUtils;
import java.io.Serializable;

public class ShareImageBean implements Serializable {
    private boolean isVideo;
    private Bitmap mBitmap;
    private byte[] mBytes;
    private String mUrl;

    public ShareImageBean(String arg1) {

        this.mUrl = arg1;
    }

    public ShareImageBean(byte[] arg1) {

        this.mBytes = arg1;
    }

    public ShareImageBean(Bitmap arg1) {

        this.mBitmap = arg1;
    }

    public ShareImageBean(String arg1, boolean arg2) {

        this.mUrl = arg1;
        this.isVideo = arg2;
    }

    public ShareImageBean(byte[] arg1, boolean arg2) {

        this.mBytes = arg1;
        this.isVideo = arg2;
    }

    public byte[] getImageBytes(Context arg3) {
        byte[] v0;
        if(this.mBytes != null && this.mBytes.length > 0) {
            v0 = a.a(arg3, this.mBytes, this.isVideo);
        }
        else if(!TextUtils.isEmpty(this.mUrl)) {
            v0 = a.a(arg3, this.mUrl, this.isVideo);
        }
        else {
            v0 = null;
        }

        return v0;
    }

    public byte[] getOriginBytes() {
        return this.mBytes;
    }

    public String getUrl() {
        return this.mUrl;
    }

    public Bitmap getmBitmap() {
        return this.mBitmap;
    }

    public boolean isVideo() {
        return this.isVideo;
    }
}

